﻿(self.webpackChunkvk=self.webpackChunkvk||[]).push([[30897],{948588:(e,t,a)=>{"use strict";a.r(t),a.d(t,{NOSPAM_TEXT_FIELD:()=>l,CONTENT_STORY_THUMBNAIL:()=>c,noSpamPatterns:()=>n.noSpamPatterns,abortPatternMild:()=>n.abortPatternMild,noSpamSuspicious:()=>o.noSpamSuspicious,noSpamTemplates:()=>r.noSpamTemplates,dealSingleSpamer:()=>i.dealSingleSpamer,reportsTime:()=>i.reportsTime,onFiltersChange:()=>i.onFiltersChange,rollbackDocMailSpamer:()=>s.rollbackDocMailSpamer,rollbackDocWallSpamer:()=>s.rollbackDocWallSpamer,rollbackJpgMailSpamer:()=>s.rollbackJpgMailSpamer,rollbackJpgWallSpamer:()=>s.rollbackJpgWallSpamer,rollbackPngMailSpamer:()=>s.rollbackPngMailSpamer,rollbackPngWallSpamer:()=>s.rollbackPngWallSpamer,rollbackDocSpamer:()=>s.rollbackDocSpamer,rollbackPhotoSpamer:()=>s.rollbackPhotoSpamer,rollbackPhotoSpamerFromWall:()=>s.rollbackPhotoSpamerFromWall,rollbackPhotoSpamerFromMail:()=>s.rollbackPhotoSpamerFromMail,rollbackVideoSpamer:()=>s.rollbackVideoSpamer,rollbackVideoSpamerFromWall:()=>s.rollbackVideoSpamerFromWall,rollbackVideoSpamerFromMail:()=>s.rollbackVideoSpamerFromMail,entityDecode:()=>p,selectText:()=>d,removeSelectedText:()=>u,getSelectedText:()=>_,selectValue:()=>m,removeFidSearch:()=>h,banFidZero:()=>g,banFidForever:()=>f,isClaimContent:()=>v,getFieldName:()=>b});var n=a(581164),o=a(915087),r=a(768099),i=a(25961),s=a(363983),l="_console_item_field_text",c="content_thumbnail_story";function p(e){return se("<textarea>"+e+"</textarea>").value}function d(e){var t=document,a=t.getElementById(e);if(t.body.createTextRange)(n=t.body.createTextRange()).moveToElementText(a),n.select();else if(window.getSelection){var n,o=window.getSelection();(n=t.createRange()).selectNodeContents(a),o.removeAllRanges(),o.addRange(n)}}function u(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty()}function _(){var e="";return window.getSelection?e=window.getSelection():document.getSelection?e=document.getSelection():document.selection&&(e=document.selection.createRange().text),e}function m(e){var t=ge(e);return t.options[t.selectedIndex].value}function h(e,t){ajax.post("noSpam.php",{act:"a_remove_fid_search",fid:e,hash:t},{onDone:function(t){ge("remove_fid_search_"+e).innerHTML=t}})}function g(e,t){ajax.post("noSpam.php",{act:"a_ban_fid_zero",fid:e,hash:t},{onDone:function(t){ge("ban_fid_zero_"+e).innerHTML=t}})}function f(e,t){ajax.post("noSpam.php",{act:"a_ban_fid_forever",fid:e,hash:t},{onDone:function(t){ge("ban_fid_forever_"+e).innerHTML=t}})}function v(){return window.nav&&window.nav.objLoc&&window.nav.objLoc.claim}function b(e){var t=domClosest(l,e);return!!t&&t.getAttribute("data-field")}},341585:(e,t,a)=>{"use strict";a.d(t,{CONSOLE_CUSTOM_NUM_FIELD:()=>E,getParams:()=>H,setIp:()=>P,setUaHash:()=>$,setConditions:()=>j,setThreshold:()=>W,composeSearchLinkFromParams:()=>G,getNumericField:()=>K,getConditionsHint:()=>X,switchParams:()=>q,conditionsClear:()=>Q,clearAllExceptConditions:()=>Z,optionClear:()=>ee,addPatternPart:()=>ae,showUserStory:()=>re,escapeRegexConditionsInput:()=>se,mount:()=>le});a(59357),a(820075),a(991181),a(296253),a(530522),a(21466);var n,o,r,i=a(610124),s=a(25961),l=a(198019),c=a(695724),p=a(54),d=a(948588),u=(a(19331),a(667294)),_=a(973935),m=a(481117),h=a(564793),g=a(961540),f=1576215,v=163176673,b="console_locked",k="_apply_pattern",y="_search_reports",w="debug_pattern",C="_queries_toggle",S="console_show_message",T="nospam_console_custom_num_condition",L="highlighted",E="custom";function D(){return hasClass(l.consoleWrap,b)}function x(){D()||addClass(l.consoleWrap,b),removeClass(l.consoleWrap,S)}function B(){var e=geByClass1(k,l.patternWrap),t=geByClass1(y,l.patternWrap);D()&&removeClass(l.consoleWrap,b),unlockButton(e),unlockButton(t)}function N(e,t){var a=geByClass1("_console_error",l.consoleWrap),n=geByClass("console_item");a.innerHTML="",e||(e="");var o=ce("div");e&&(o.innerHTML=e),o.className=t?"error":"info_msg",e.match(/\/pattern[0-9]+/)&&n&&n.forEach((function(e){e.className="console_item red_item"})),addClass(l.consoleWrap,S),a.appendChild(o),B()}function I(e){n&&clearTimeout(n),n=setTimeout((()=>{domData(l.consoleWrap,"failed",0)}),3e3),domData(l.consoleWrap,"failed",1),console.error(e),N(e,!0)}function M(){var e=ge("queries",l.consoleWrap);return geByClass1(C,l.consoleWrap).innerHTML=isVisible(e)?"Показать запросы":"Скрыть запросы",toggle(e)}function H(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=[],a=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a={},n=function(e){var t="conditions_input"===e.id?domPS(e):domNS(e);return hasClass(t,"option_cleared")},o=function(t){return e&&n(t)};a[`type${t}`]=cur[`uiSpamtype${t}`].val();var r=ge(`pattern_input${t}`);a[`pattern${t}`]=o(r)?R(r):r.value,a[`threshold${t}`]=ge(`threshold_input${t}`).value;var i=ge(`uid_input${t}`);a[`uid${t}`]=o(i)?R(i):i.value;var s=ge(`ip_input${t}`);a[`ip${t}`]=o(s)?R(s):s.value;var l=ge(`uahash_input${t}`);a[`uahash${t}`]=o(l)?R(l):l.value;var c=ge(`time_start_input${t}`);a[`time_start${t}`]=o(c)?R(c):c.value;var p=ge(`time_finish_input${t}`);return a[`time_finish${t}`]=o(p)?R(p):p.value,a[`conditions${t}`]=window[`ConditionsEditor${t}`].getPlainText(),a},n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=[];Array.from(geByClass("option_cleared",e)).forEach((function(e){var t=geByTag1("input",domPN(e))||geByTag1("textarea",domPN(e));a.push(t.id)}));var n=[];return a.forEach((e=>{switch(e){case`pattern_input${t}`:n|=cur.hideFieldsBitMasks.substring;break;case`ip_input${t}`:n|=cur.hideFieldsBitMasks.ip;break;case`uahash_input${t}`:n|=cur.hideFieldsBitMasks.uaHash;break;case`uid_input${t}`:n|=cur.hideFieldsBitMasks.uid;break;case`time_finish_input${t}`:n|=cur.hideFieldsBitMasks.timeFinish;break;case`time_start_input${t}`:n|=cur.hideFieldsBitMasks.timeStart;break;case`conditions_input${t}`:n|=cur.hideFieldsBitMasks.conditions}})),n};t.simplify=cur.uiSimplify.val(),t.duration=cur.uiDuration.val(),t.bantype=cur.uiBan.val(),t.search_period=cur.uiSearchPeriod.val();var o=cur.uiSearchPeriod.selectedItems();return o&&o.length>0&&(t.period_in_seconds=3===o[0].length&&1===o[0][2]?1:0),t.comment=ge("comment_input").value,t.all_actions=isChecked("all_actions")||!1,t.notbannedonly=isChecked("not_banned_only")||!1,t.linksonly=isChecked("links_only")||!1,t.wrap_actions=null===ge("wrap_actions")?1:isChecked("wrap_actions"),t.encode_entities=null===ge("encode_entities")?1:isChecked("encode_entities"),t.hidden_fields=n(geByClass1("pattern_part_root")),extend(t,a(e,"")),te()&&(t.hidden_fields2=n(geByClass1("pattern_part_child"),"2"),extend(t,a(e,"2"))),t}function R(e){return domData(e,"restore")}function A(e,t){return domData(e,"restore",t)}function F(){var e=ge("pattern_input"),t=geByClass1(y,l.patternWrap),a=H();if(!e.value)return scrollToTop(0),void notaBene(e);if(!isButtonLocked(t)){x(),lockButton(t),o&&(tooltips.destroy(o.el),o=!1);var n=document.getElementById(m.rootId+"ConsoleLinks");n&&(_.unmountComponentAtNode(n),cur.sampleLinks=null),a.act="a_console_find_actions",ajax.post("noSpam.php",a,{onDone:(e,t)=>function(e,t){B(),geByClass1("_console",l.consoleWrap).innerHTML=e;var a=geByClass1("_console_numfield_ip1024",l.consoleWrap);a&&new InlineDropdown(a,{items:[[256,"/24 - 256"],[1024,"/22 - 1024"],[4096,"/20 - 4096"],[16384,"/18 - 16k"],[65536,"/16 - 65k"],[262144,"/14 - 262k"],[1048576,"/12 - 1kk"]],selected:256,withArrow:!0,keepTitle:!0,autoShow:!0,autoHide:300,onSelect:e=>K("ip"+e)}),cur.linksBanComment="";var n=t.links;if(n){var o=JSON.parse(n),r=document.getElementById(m.rootId+"ConsoleLinks");o&&0!==o.domains&&r&&_.render(u.createElement(h.ConsoleLinks,{linksDataRaw:o,banHash:t.links_block_mass_hash,ref:e=>window.cur.sampleLinks=e}),r)}}(e,t),onFail:e=>I(e)})}}function O(e,t){"string"==typeof t&&(t=clean(t)),val(e,t),ee(!1,ge(e),"reset")}function P(e){O("ip_input",e)}function $(e){O("uahash_input",e)}function j(e){window.ConditionsEditor.update("append",e)}function W(e){O("threshold_input",e)}function G(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e||(e=H(!0));var t=Object.keys(e);t.sort();for(var a=[],n=0;n<t.length;n++){var o=t[n],r=e[o];a.push(encodeURIComponent(o)+"="+encodeURIComponent(r))}return"/noSpam?"+a.join("&")}function U(){var e=G(),t=geByClass1("_get_pattern_link");t&&t.tt&&t.tt.destroy(),addClass(t,"progress"),ajax.post("noSpam.php",{act:"get_search_link",link:e},{onDone:function(e){removeClass(t,"progress"),showTooltip(t,{text:e,slide:15,center:1,black:1,nohide:1,hidedt:400,shift:[0,2,0],onShowEnd:()=>{(0,window.selectText)("shorten_link"),setTimeout(t.tthide,3e3)}})},onFail:function(e){removeClass(t,"progress"),topError(e,{dt:5})}})}function V(){var e=geByClass1(w,l.patternWrap);if(!isButtonLocked(e)){var t=extend(H(),{act:"debug_pattern"});x(),ajax.post("noSpam.php",t,{onDone:e=>N(e),onFail:e=>I(e)})}}function K(e,t){var a=isChecked("values_hist"),n=H();n.need_hist=a,n.act="numeric_field",n.field=e,n.custom_condition=t||"",cur.numFieldSel=e,ajax.post("noSpam.php",n,{onDone:function(n,o){var r=clean(t||e);showFastBox({width:a?330:710,title:r,dark:1,containerClass:"nospam_hist_wrap",hideButtons:a},n).evalBox(o)},progress:"console_query_fields_progress"})}function z(e){r=e,geByClass1("_nospam_console_custom_num_condition_patterns").innerHTML=e}function J(e){var t=domData(e.target,"field"),a=H();a.act="link_field",a.field=t,ajax.post("noSpam.php",a,{onDone:(e,a)=>{!function(e,t,a){if(a.links){var n=JSON.parse(a.links),o=u.createElement("span",null,"В этом поле не найдено доменов или ссылок");!n||0===n.domains.length&&0===n.external_links.length||(o=u.createElement(h.ConsoleLinks,{linksDataRaw:n,banHash:a.links_block_mass_hash})),(0,m.showComponentInBox)((0,m.renderCommonBox)(e,o),{width:710,title:e,dark:1})}else showFastBox({width:710,title:e,dark:1},t)}(t,e,a)},progress:"console_query_fields_progress"})}function X(e){var t=2===e?cur.uiSpamtype2.val():cur.uiSpamtype.val();return showBox("noSpam.php",{act:"conditions_hint",spamtype:t},{dark:1,containerClass:"nospam_hint_wrap"})}function Y(){var e=H(),t=geByClass1(k,l.patternWrap);e.act="apply_pattern",isButtonLocked(t)||null===document.querySelector(".console_failed_queries")&&(x(),lockButton(t),ajax.post("noSpam.php",e,{onDone:e=>{var t;N(e.pattern_applied_text),t=e.pattern_id,cur.sampleLinks&&(cur.setLinksBanComment(`https://${(0,g.getHostName)()}/pattern${t}`),cur.sampleLinks.syncWithCurComment())},onFail:e=>I(e)}))}function q(){var e=["pattern_input","threshold_input","ip_input","uahash_input","time_finish_input","time_start_input","conditions_input"];e.pop();var t=window.ConditionsEditor.getEditorState(),a=window.ConditionsEditor2.getEditorState();window.ConditionsEditor.setEditorState(a),window.ConditionsEditor2.setEditorState(t),e.forEach((e=>{var t=ge(e).value;ge(e).value=ge(e+"2").value,ge(e+"2").value=t}));var n=cur.uiSpamtype.val();cur.uiSpamtype.selectItem(cur.uiSpamtype2.val()),cur.uiSpamtype2.selectItem(n),toggleClass(el,"switched")}function Q(){window.ConditionsEditor.handleClearRestore()}function Z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=["pattern_input","ip_input","uahash_input","uid_input","time_finish_input","time_start_input"];t.forEach((t=>{ee(document.getElementById(t+e).nextElementSibling,t+e,"soft_clear")}))}function ee(e,t,a){var n=ge(t),o=hasClass(e,"option_cleared");function r(a){var n=val(a);switch(A(a,n),t){case"pattern_input":case"pattern_input2":val(a,"/"),cur.uiSimplify.selectItem(32);break;case"threshold_input":case"threshold_input2":val(a,a.value&&"2"===a.value?"1":"2");break;default:val(a,"")}n&&addClass(e,"option_cleared")}switch(a){case"clear":o?function(){switch(t){case"threshold_input":case"threshold_input2":r(n);break;default:o&&(n.value=R(n))}removeClass(e,"option_cleared"),removeClass(e,L)}():r(n);break;case"reset":!function(){var e=geByClass1("option_clear",n.parentNode);A(n,""),removeClass(e,"option_cleared"),removeClass(e,L)}();break;case"reset_all":geByClass("option_clear").forEach((function(e){A(ge(e.getAttribute("data-option")),""),removeClass(e,"option_cleared"),removeClass(e,L)}));break;case"soft_clear":o||r(n)}}function te(){var e=geByClass1("_pattern_part_child");if(!isVisible(e))return!1;for(var t=geByClass("cloneable_input",e),a=0;a<t.length;a++)if(val(t[a]))return!0;return!1}function ae(){var e=geByClass1("pattern_wrap"),t="pattern_composite";hasClass(e,t)?removeClass(e,t):addClass(e,t)}function ne(){}function oe(e){var t=ge(document.activeElement);if(e.altKey)switch(-1!==[49,50,51,52,53,67,70,81,82,83,87].indexOf(e.keyCode)&&t&&t.blur(),e.keyCode){case 83:(0,l.activeTab)()===l.tabPattern?F():(0,l.activeTab)()===l.tabReports&&(0,s.prepareReport)((0,s.activeReportsType)(),(0,s.activeSubReportsType)());break;case 70:if(-1!==[f,v].indexOf(vk.id))return Y();break;case 81:ie("pattern_input");break;case 82:ie("conditions_regex");break;case 87:ie("conditions_simple");break;case 67:Q(),cur.conditions.deselectTemplate();break;case 49:cur.uiSearchPeriod.selectItem(1);break;case 50:cur.uiSearchPeriod.selectItem(24);break;case 51:cur.uiSearchPeriod.selectItem(72);break;case 52:cur.uiSearchPeriod.selectItem(240);break;case 53:cur.uiSearchPeriod.selectItem(2160)}}function re(e){var t=domData(e,"owner_id"),a=domData(e,"story_id"),n=domData(e,"moderator_hash");cur.noStoriesBack=!0,window.showStory(`${t}/${t}_${a}/moderator_hash:${n}`)}function ie(e){if(e){var t=getSelectionText();switch(e){case"pattern_input":O("pattern_input",t),cur.uiSimplify.selectItem("0");break;case"conditions_simple":case"conditions_regex":var a=document.getSelection().baseNode,n=(0,d.getFieldName)(a);if(!n)return;j("conditions_simple"===e?`'${t}' << ${n}`:`@check_regex('${se(t)}', ${n})`)}(0,d.removeSelectedText)()}}function se(e){return e.replace(/[.|+*(){}\[\]^$?]/g,"\\\\$&")}function le(){var e=window.pageNode,t=window.browser.msie6?e:window,a=geByClass1("_pattern_buttons",l.patternWrap),n=(0,i.createModule)({handlers:(e,n)=>{n(a,"click",y,F),n(a,"click",k,Y),n(a,"click","_get_pattern_link",U),n(a,"click",w,V),n(l.consoleWrap,"click",C,M),n(l.consoleWrap,"click","_console_linkfield_action",(e=>J(e))),n(l.consoleWrap,"click","_console_numfield_action",(e=>{var t=e.target,a=domData(t,"field");a!==E?K(a):function(e){var t="nospam_console_custom_num_condition",a=()=>{var e=ge(T),t=val(e);if(t){var a={act:"a_numeric_field_add_condition",custom_condition:t};ajax.post("noSpam.php",a,{onDone:z.pbind()}),K(E,t)}else notaBene(e)},n={className:"nospam_console_custom_num_condition_wrap",text:getTemplate("nospam_console_custom_num_condition"),forcetodown:1,nohide:1,forceNoHide:1,shift:[10,8],showdt:0,onShowEnd:()=>{elfocus(ge(T))},onShowStart:()=>{val(T,ls.get(t)||"")},init:n=>{o=n;var r=ge(T);addEvent(r,"keypress",(e=>onEnter(a,e))),addEvent(r,"keyup",(()=>ls.set(t,val(r))));var i=geByClass1("_nospam_console_custom_num_condition_close",domPN(r));addEvent(i,"click",(()=>e.tthide()))}};o?(o.show(),a()):showTooltip(e,n),r&&z(r)}(t)})),n(t,"click","_nospam_console_custom_num_condition_pattern",(e=>{var t=e.target,a=(0,c.unclean)(domData(t,"pattern"));val(T,a)})),n(t,"click","_nospam_console_custom_num_condition_clear",(e=>{var t=e.target,a={act:"a_numeric_field_delete_condition",custom_condition:(0,c.unclean)(domData(t,"pattern"))};ajax.post("noSpam.php",a,{onDone:z.pbind()})})),n(l.consoleWrap,"click","console_set_range",(e=>{var t=e.target,a=domData(t,"time");a<0?O("time_finish_input",-a):a>0&&function(e){O("time_start_input",e)}(a)})),n(l.consoleWrap,"click","console_uid",(e=>{e.altKey&&e.ctrlKey&&(O("uid_input",e.target.dataset.uid),cancelEvent(e))})),e(t,"scroll",ne),e(document,"keydown",oe),n(l.patternWrap,"click","_option_clear",(e=>{var t=e.target;ee(t,domData(t,"option"),"clear")})),n(l.patternWrap,"click","_conditions_clear",(e=>{domNS(e.target).id.replace("conditions_input","");Q()})),n(document,"click","_console_conditions",(e=>{var t=e.target;j(domData(t,"conditions"))})),n(l.consoleWrap,p.EVENT_MOUSEDOWN,d.CONTENT_STORY_THUMBNAIL,(e=>re(e.target))),n(l.consoleWrap,p.EVENT_MOUSEDOWN,"_console_item_field_length",(e=>{var t=(0,d.getFieldName)(e.target);if(t){var a=e.target.dataset.length,n="=";switch(e.target.dataset.mode){case"less":n="<",a=Math.floor(1.3*a);break;case"greater":n=">",a=Math.round(.7*a)}j(`@length(${t}) ${n} ${a}`)}})),n(l.consoleWrap,"click","console_item_exclude_uid",(e=>{addClass(e.target.closest(".console_item"),"console_item_excluded"),j(`uid != ${e.target.dataset.uid}`)})),n(l.consoleWrap,"click","console_item_pattern_from_sample",(e=>{var t={pattern:"/",simplify:"simplify",uid:e.target.dataset.uid,ip:e.target.dataset.ip,ua_hash:e.target.dataset.ua,type:cur.uiSpamtype.val(),bantype:cur.uiBan.val(),duration:cur.uiDuration.val(),search_period:cur.uiSearchPeriod.val()};(0,p.openInNewTab)(G(t))}))}});cur.destroy.push((()=>{(0,i.destroyModule)(n)}))}},168597:(e,t,a)=>{"use strict";var n;function o(){n=(new Date).getTime()}function r(){var e=(new Date).getTime(),t=(e-n)/1e3,a=Array.prototype.slice.call(arguments);a.push(t),debugLog.apply(null,a)}a.d(t,{startDebugTimer:()=>o,debugLogTimer:()=>r})},581164:(e,t,a)=>{"use strict";a.d(t,{abortPatternMild:()=>l,noSpamPatterns:()=>c});var n,o,r,i=a(198019),s={};function l(e){ajax.post("noSpam.php",{act:"a_abort_pattern_mild",pid:e},{onDone:function(){ge("abort_pattern_mild"+e).innerHTML="<span style = 'color: green'>остановлен</span>"},onFail:function(){ge("abort_pattern_mild"+e).innerHTML="<span style = 'color: red'>ошибка</span>"}})}var c={patternTooltip:function(e,t){var a={content:s[t]?s[t].tooltip:"",className:"pattern_tt_wrap",nohideover:0,showsp:150,slide:15,hasover:0,shift:[5,0,0]};return showTooltip(e,a)},updateProcess:function(e){var t=vkNow();"patterns"===(0,i.activeTab)()&&-1!=window._wf&&((t-o>5e3||e)&&(ajax.post("noSpam.php",{act:"a_in_process"},{onDone:function(e){var t=ge("in_process");if(t)return e>0?animateCount(t,e):t.innerHTML=e},onFail:function(e){ge("in_process").innerHTML=e||"Неизвестная ошибка (banProcess)"}}),o=t),(t-n>1e4||e)&&(ajax.post("noSpam.php",{act:"a_last_patterns"},{onDone:function(e){var t=geByClass1("in_process_wrap");if(t){show(t);var a=e.table;delete e.table,s=e,ge("patterns").innerHTML=a}},onFail:function(e){var t=geByClass1("in_process_wrap");if(t)return t.innerHTML=e||"Неизвестная ошибка (pProcess)"}}),n=t))},clearTimer:function(){clearInterval(r)},initUpdate:function(){this.updateProcess(!0),r||(r=setInterval(this.updateProcess,1e3),cur.destroy.push(this.clearTimer))}}},25961:(e,t,a)=>{"use strict";a.d(t,{activeReportsType:()=>S,activeSubReportsType:()=>T,prepareReport:()=>L,dealSingleSpamer:()=>M,reportsTime:()=>R,onFiltersChange:()=>P,mount:()=>$,noSpamReports:()=>j});a(175115),a(530522),a(66108),a(579665),a(95767),a(820075),a(751876),a(991181),a(296253);var n=a(289988),o=a(341585),r=a(198019),i=a(168597),s=a(54),l=a(610124),c=a(363983),p=a(948588),d=a(961540);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},u.apply(this,arguments)}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var a=[],n=!0,o=!1,r=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(a.push(i.value),!t||a.length!==t);n=!0);}catch(e){o=!0,r=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw r}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(a);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return m(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var h="report_subfilter_active",g="active_filter",f="active_type",v=["botscore","hacked_score","secondary_score"],b={},k={},y=new Date,w=setTimeout(null),C=0;function S(){var e=geByClass1(g,r.reportTabs);return domData(e,"type")}function T(){var e=geByClass1("_reports_subtabs",r.reportTabs),t=geByClass1(g,e);return domData(t,"subtype")}function L(e,t){(0,i.startDebugTimer)();var a=geByClass1("_report_btn_update",r.reportList);if(!isButtonLocked(a)){var n=geByClass1("_reports_"+e+"_wrap",r.reportList);if(n){var o={act:"a_get_reports",encode_entities:1,type:e,sub_type:t,shift:cur.options.shift};"mail"===e&&"mail_group"===t&&(o=extend(o,function(){if("mail"===e||"mail_group"===t){var a=geByClass1("filters");return{hide_groups_with_disabled_messages:isChecked(geByClass1("hide_groups_with_disabled_messages_filter",a)),shift:isObject(cur.hoursShiftSlider)?23*cur.hoursShiftSlider._currValue:0,min_reporters_amount:val(geByClass1("min_reports_amount_filter",a)),sorting:radioval("group_messages_reports_sorting")}}console.log("Unsupported filters used")}())),ajax.post("noSpam.php",o,{onDone:function(t){if((0,i.debugLogTimer)("actions fetch"),b={},0!==t.length){for(var a=0;a<t.length;a++){var o=t[a];o.ui_type=e;var r=E(o.ui_type,a);F(o.ua_hash,o.agent_name),delete o.agent_name,delete o.remix_seed,o.index=a,b[r]=o}n.innerHTML="",D(e,0),t=""}else n.innerHTML=getTemplate("nospam_reports_type_search_empty")},onFail:function(e){(0,i.debugLogTimer)("actions fetched fail"),topError(e),n.innerHTML=getTemplate("nospam_reports_type_search_error")},showProgress:lockButton.pbind(a),hideProgress:unlockButton.pbind(a)}),scrollToTop()}else topError("Can't find wrap for type: "+e)}}function E(e,t){return"report_"+e+"_"+t}function D(e,t,a){(0,i.startDebugTimer)(),a||(a=20);for(var n=geByClass1("_reports_"+e+"_wrap",r.reportList),o=domPN(n),s=geByClass1("_reports_type_show_more",o),l=0,c=0,p=0;l<a;){c=p,p++;var d=E(e,c),u=b[d];if(!(c<t)){if("object"!=typeof u){debugLog("empty reports after "+c,"need to shift "+t);break}if(u.uid&&!0!==u.showed){var m=ce("div",{id:"report_"+e+"_"+c});addClass(m,"clear_fix"),addClass(m,"report");var h=u.uid_base_info;if(u.mem_banned||h){if((0,r.getCustomOption)("reports_hide_processed")&&h)continue;addClass(m,h?"processed":"banned_others")}u.ui_type=e;[N(u),_(B(u),1)[0],I(u,c)].forEach((function(e){m.appendChild(e)})),n.appendChild(m),l++}}}if(0!==l){s?isVisible(s)||show(s):(s=ce("div",{className:"reports_type_show_more _reports_type_show_more"}),o.appendChild(s));var g=parseInt(t)+20;s.innerHTML=getTemplate("nospam_reports_show_more",{need_shift:g}),(0,i.debugLogTimer)("actions to html")}else hide(s)}function x(){var e=getSelectionText();e?cur.uiSimplify.selectItem("0"):(e="/",cur.uiSimplify.selectItem("32")),val("pattern_input",e)}function B(e){var t,a="",n=e.type_name,o=parseInt(e.type),i=ce("div");addClass(i,"report_body report_body_regular"),e.api_id>0&&(a+=e.api_id>0?`<div class="report_api">Приложение ${e.app_name} (${e.api_id}):</div>`:""),e.message&&(a+=getTemplate("nospam_reports_field",{class:"report_message",value:e.message})),e.kludges&&(a+=getTemplate("nospam_reports_field",{class:"reports_kludges",value:e.kludges})),e.attaches&&(a+=getTemplate("nospam_reports_attaches",{attaches:e.attaches}));var s="";switch(o){case 500:case 510:case 545:t="<a href='/wall"+e.owner_id+"_"+e.msg_id+"' target='_blank'> "+n+"</a>";break;case 501:case 550:t="<a href='/wall"+e.owner_id+"_"+e.parent_id+"?reply="+e.msg_id+"' target='_blank'> "+n+"</a>",e.group_id&&e.group_link&&(a+=getTemplate("nospam_reports_group_id",{group_id:e.group_id,group_link:e.group_link}));break;case 100:e.score&&e.score.hasOwnProperty("phone_cheat")&&(s+=getTemplate("nospam_reports_score_block",{label:"phone_cheat",score:e.score.phone_cheat})),e.update_time&&(a+=getTemplate("nospam_reports_tag",{tag_label:e.update_time})),e.uid%2==1&&(i.classList.remove("report_body_regular"),i.classList.add("report_body_odd"));break;case 200:a+=getTemplate("nospam_reports_labeled_value",{label:"receivers_num",value:e.receivers_num}),a+=getTemplate("nospam_reports_labeled_value",{label:"chat_msg_id",value:e.chat_msg_id}),a+=getTemplate("nospam_reports_labeled_value",{label:"chat_title",value:e.chat_title});break;case 300:if(e.group_id&&e.group_link&&(a+=getTemplate("nospam_reports_group_id",{group_id:e.group_id,group_link:e.group_link})),e.admin_id&&e.admin_link){var l=e.admin_id;a+=getTemplate("nospam_reports_admin_id",{admin_id:l,admin_link:e.admin_link})}break;case 160:a+=e.title;break;case 161:a+=e.new_title;break;case 200:e.attaches;-152029297==e.uid&&e.original_user_link&&(a+=getTemplate("nospam_reports_molodec_label",{original_user_link:e.original_user_link}));case 2602:case 2647:t="<a href='/video"+e.owner_id+"_"+e.video_id+"' target='_blank'> "+n+"</a>";break;case 2600:case 2610:case 2611:case 2645:case 2650:t="<a href='/video"+e.owner_id+"_"+e.video_id+"' target='_blank'> "+n+"</a>",a+=e.video_thumb,a+='<div class="report_custom_field"><b>duration:</b> <a class="_console_conditions" data-conditions="duration = '+e.duration+'">'+e.duration+"</a></div>",e.external&&(a+='<div class="report_custom_field"><b>external:</b> '+e.external+"</div>"),Number(e.folder_id)&&(a+=`<div class="report_custom_field"><b>folder_id:</b> ${e.video_folder_name} (${e.folder_id})</div>`);break;case 3504:case 3545:t="<a href='/photo"+e.owner_id+"_"+e.photo_id+"' target='_blank'> "+n+"</a>";break;case 13120:case 13121:t="<a href='/market"+e.owner_id+"?w=product"+e.owner_id+"_"+e.item_id+"' target='_blank'> "+n+"</a>";break;case 3500:case 3547:t="<a href='/photo"+e.owner_id+"_"+e.photo_id+"' target='_blank'> "+n+"</a>",a+='<table class="report_photo"><tr>',a+='<td><div class="report_photo_thumb">'+e.photo+"</div></td>",a+=e.description?'<td><div class="report_photo_description">'+e.description+"</div></td>":"",a+="</tr></table>",a+=e.album_id<0?'<div class="report_album_id"><b>album_id:</b> '+e.album_id+"</div>":"";break;case 3550:t="<a href='/photo"+e.owner_id+"_"+e.photo_id+"' target='_blank'> "+n+"</a>",a+=e.photo,a+=e.album_id<0?'<div class="report_album_id"><b>album_id:</b> '+e.album_id+"</div>":"";break;case 9258:a+=e.about;break;case 1800:a+=e.status;break;case 1531:case 1530:case 1534:a+=getTemplate("nospam_reports_field",{class:"report_message",value:e.text});break;case 5e3:t="<a href='/topic-"+e.group_id+"_"+e.topic_id+"' target='_blank'> "+n+"</a>",a+=e.title;break;case 5001:case 5046:t="<a href='/topic-"+e.group_id+"_"+e.topic_id+"?post="+Math.abs(e.comment_id)+"' target='_blank'> "+n+"</a>";break;case 2131:var c=e.group_id;t="Группа: "+getTemplate("nospam_reports_id_link",{type:"club",id:c,label:c,color:"black"}),a+="<b>Название:</b>"+e.group_name+"<br>",a+="<b>Описание:</b>"+e.group_description+"<br>";break;case 7530:t="<a href='/app"+e.app_id+"' target='_blank'> "+n+"</a>",a+=e.app_name+"<br>";break;case 3670:var p=e.like_ref,u=e.like_type,_=e.owner_id+"_"+e.item_id,m="",h=(0,d.getHostName)();switch(Number(u)){case 11:t="<a href='wall<a href='wall"+_+"' target='_blank'> "+n+"</a>",m+="(запись на стене), <a href='wall"+_+"' target='_blank'>"+h+"/wall"+_+"</a>";break;case 12:t="<a href='wall"+_+"' target='_blank'> "+n+"</a>",m+="(комментарий на стене), <a href='wall"+_+"' target='_blank'>"+h+"/wall"+_+"</a>";break;case 10:t="<a href='photo"+_+"' target='_blank'> "+n+"</a>",m+="(фотография), <a href='photo"+_+"' target='_blank'>"+h+"/photo"+_+"</a>";break;case 24:case 8:t="<a href='photo"+_+"' target='_blank'> "+n+"</a>",m+="(видеозапись), <a href='video"+_+"' target='_blank'>"+h+"/video"+_+"</a>";break;case 6:t="<a href='audio.php?id="+e.owner_id+"&audio_id="+e.item_id+"' target='_blank'> "+n+"</a>",m+="(аудиозапись), <a href='audio.php?id="+e.owner_id+"&audio_id="+e.item_id+"' target='_blank'>"+h+"/audio.php?id="+e.owner_id+"&audio_id="+e.item_id+"</a>";break;case 22:t=n,m+="(комментарий к видео)";break;case 21:t=n,m+="(комментарий к фотографии)";break;case 20:t=n,m+="(комментарий на стене)";break;default:t=n,m+=" (незвестный тип) "+_}a+=getTemplate("nospam_reports_report_like",{like_ref:p,like_ref_id:e.ref,like_type:m,like_type_id:u});break;case 3522:var g=e.mini_app_link?getTemplate("nospam_reports_labeled_value",{label:"mini_app_id",value:`${e.mini_app_id} (${e.mini_app_link})`}):"",f=e.texts?getTemplate("nospam_reports_labeled_value",{label:"texts",value:e.texts}):"",b=e.attachment_link_row?getTemplate("nospam_reports_labeled_value",{label:"attachment_link_row",value:e.attachment_link_row}):"",k=e.owner_link?getTemplate("nospam_reports_labeled_value",{label:"owner_id",value:`${e.owner_id} (${e.owner_link})`}):"";a+=getTemplate("nospam_reports_report_story",{story_thumbnail:e.story,mini_app_row:g,texts_row:f,attachment_link_row:b,owner_row:k});break;default:console.log("No type specified")}if(e.post_tags){var y=e.post_tags;Object.keys(y).forEach((function(e){y[e]&&(a=getTemplate("nospam_reports_tag",{tag_label:y[e]})+a)}))}if(e.score){var w=function(e){if(0===e.length)return!1;var t=[];for(var a in e)v.includes(a)&&t.push([a,e[a]]);if(0===t.length)return!1;return t.sort(((e,t)=>t[1]-e[1])),t[0]}(e.score);w&&(s+=getTemplate("nospam_reports_score_block",{label:w[0],score:w[1]})),a+=getTemplate("nospam_reports_scores",{score_blocks:s})}return a+=function(e){var t,a,n=e.uid_base_info,o=e.mem_banned,i="",s="";if(n){var l=e.pattern_additional_info;t=Number(n[0].pattern_id),a=Number(n[0].state);var c=(p=l.admin_name,d=Number(n[1].admin_id),u=p.split(" ").reduce(((e,t)=>e+t[0]),""),getTemplate("nospam_reports_id_link",{type:"id",id:d,label:u,color:"black"}));i=`${0===a?"Обрабатывается: ":"Обработан: "} шаблон <a href='/pattern${t}' target='_blank'>${t}</a> (${l.pattern_type_name}; ${l.pattern_params}) от ${c}`}var p,d,u;o&&(s=`${H(new Date(1e3*o.time))}: ${o.comment}`);if(!(0,r.getCustomOption)("reports_hide_ban_info")&&(n||o))return`<div class="BannerInfo"><div class="report_processed_info">${i}</div><div>${s}</div></div>`;return""}(e),i.innerHTML=a,[i,t]}function N(e){var t,a=e.mem_banned,n=isObject(a),o=(E(e.ui_type,e.index),!1),r=ce("div");addClass(r,"report_info"),n&&(addClass(r,"report_banned"),o=Number(a.ban_time)<0);var i,s=e.uid,l=Number(e.type),c=n?"red":"blue",p=o?"forever":"";return t=s>0?getTemplate("nospam_reports_id_link",{type:"id",id:s,label:s,color:c}):getTemplate("nospam_reports_id_link",{type:"club",id:-s,label:s,color:c}),i=_(B(e),2)[1],r.innerHTML=getTemplate("nospam_reports_report_info",{action_mention_link:t,ban_time_class:p,type:l,index:e.index,ip:e.ip,report_time:H(new Date(1e3*e.report_time)),action_time:H(new Date(1e3*e.time)),ua_hash:e.ua_hash,from_uid:e.from_uid,report_count:e.report_count>1?langNumeric(e.report_count,["","%s жалоба","%s жалобы","%s жалоб"]):"",report_type_link:i}),r}function I(e,t){var a="",n="report_"+e.ui_type+"_"+e.index,o=ce("div");addClass(o,"report_steps");var r=cur.isSearchOnlyMode;if(("photo"===e.ui_type||"video"===e.ui_type)&&!r){var i=e[e.ui_type+"_id"];a+="<a id = 'spamer_by_"+n+'\' class="flat_button button_small secondary" onclick = "'+`dealSingleSpamer('${e.ui_type}', ${e.index}, ${e.uid}, '${e.deal_single_spamer_hash}', ${e.type}, ${e.time}, ${e.owner_id}, ${i})`+'">Забанить и откатить</a>'}return a+=getTemplate("nospam_reports_compose_button",{type:e.real_ui_type?e.real_ui_type:e.ui_type,ip:e.ip,ua_hash:e.ua_hash}),r||(a+=function(e){var t=e.first_attached_photo_kid,a=e.first_attached_doc_md5,n=e.first_attached_doc_size,o=e.first_attached_video_content_id;if(t)return getTemplate("nospam_reports_cp_fast_pattern_photo",{kid:t});if(o)return getTemplate("nospam_reports_cp_fast_pattern_video",{content_id:o});if(a&&n)return getTemplate("nospam_reports_cp_fast_pattern_doc",{md5:a,size:n});return""}(e)),a+="<span id='selected_text_span"+t+"' style='display:none;'></span>",o.innerHTML=a,o}function M(e,t,a,n,o,r,i,s){var l="report_"+e+"_"+t,p=c.reportsRollbackSpamerDone,d=c.reportsRollbackSpamerFail;"photo"===e?(0,c.rollbackPhotoSpamer)(a,n,o,r,i,s,(()=>p(l)),(()=>d(l))):"video"===e&&(0,c.rollbackVideoSpamer)(a,n,o,r,i,s,(()=>p(l)),(()=>d(l)))}function H(e){var t=e.getDate(),a=e.getMonth()+1;return(t<10?"0":"")+t+"."+(a<10?"0":"")+a+" в "+e.toLocaleTimeString()}var R={_sel:[],day:y.getDate(),month:y.getMonth(),months:[[0,"Января"],[1,"Февраля"],[2,"Марта"],[3,"Апреля"],[4,"Мая"],[5,"Июня"],[6,"Июля"],[7,"Августа"],[8,"Сентября"],[9,"Октября"],[10,"Ноября"],[11,"Декабря"]],year:y.getFullYear(),generateHMS:function(e){var t,a=[];switch(e){case"hour":t=23;break;case"minute":case"second":t=59}for(var n=0;n<=t;++n)a.push([n,n<10?"0"+n:n+""]);return a},generateDays:function(e,t){for(var a=[],o=(0,n.getLastDay)(e,t),r=1;r<=o;++r)a.push([r,r+""]);return a},updateDays:function(){var e=this._sel[0],t=this._sel[1].val(),a=this._sel[2].val();e.val()>(0,n.getLastDay)(a,t)&&e.clear(),e.setData(this.generateDays(a,t))},setControls:function(){var e=R,t=[["reports_day",55],["reports_month",95],["reports_year",60],["reports_hour",50],["reports_minute",50],["reports_second",50]],a=ce("div",{id:"reports_time_wrap",className:"reports_time_wrap"}),n=geByClass1("box_body");e.clear(),n.appendChild(a),t.forEach((function(a,o){var r=[],i=[],s=ce("div",{className:a[0]+" fl_l"}),l=ce("input",{type:"hidden",name:a[0],id:a[0]}),c=a[0].split("_")[1];switch(domLC(n).appendChild(s),s.appendChild(l),c){case"year":i=(r=[[e.year,e.year+""]])[0];break;case"month":r=e.months,i=e.month;break;case"day":i=(r=e.generateDays(e.year,e.month))[e.day-1];break;case"hour":r=e.generateHMS(c),i=y.getHours();break;case"minute":r=e.generateHMS(c),i=y.getMinutes();break;case"second":r=e.generateHMS(c),i=y.getSeconds();break;default:i=r=e[c]}var p={width:t[o][1],multiselect:!1,autocomplete:!1,selectedItems:i};"month"!==c&&"year"!==c||extend(p,{onChange:function(e){R.updateDays()}}),R._sel.push(new Dropdown(l,r,p))}))},setTime:function(){boxQueue.hideLast();var e=R,t=e._sel,a={day:t[0].val(),month:t[1].val(),year:t[2].val(),hour:t[3].val(),minute:t[4].val(),second:t[5].val()},n=new Date(a.year,a.month,a.day,a.hour,a.minute,a.second),o=e.tt;val(o,n.getTime()/1e3)},set:function(e,t){var a=this.setControls,n=this.setTime,o=domData(t,"part");y=new Date;var i=o?"time_"+e+"_input2":"time_"+e+"_input";this.tt=ge(i,r.patternWrap),showFastBox({width:435,title:"Время действия ("+("start"==e?"позже":"раньше")+", чем)",dark:1,containerClass:"nospam_report_time_box",onShow:a},'<div class="reports_time_label">Укажите дату:</div>',"Применить",n)},clear:function(){return this._sel=[]}};function A(e){(0,s.isSpecialKeyPressed)(e)?function(e){var t=(0,o.getParams)();if(t.type=domData(e,"type"),null===t.type)return!1;"post"!==t.type&&"comment"!==t.type||(t.type="wall");t.ip=domData(e,"ip"),t.uahash=domData(e,"ua-hash"),t.pattern=t.pattern||getSelectionText(),t.threshold=1;var a=(0,o.composeSearchLinkFromParams)(t);(0,s.openInNewTab)(a)}(e.target):function(e){var t=domData(e,"type"),a=domData(e,"ip"),n=domData(e,"ua-hash");if(null===t)return;"post"!=t&&"comment"!=t||(t="wall");(0,o.setIp)(a),(0,o.setUaHash)(n),(0,o.setThreshold)(1),cur.uiSpamtype.selectItem(t),(0,r.switchTab)(r.tabPattern),(0,o.optionClear)(!1,"reset_all")}(e.target)}function F(e,t){var a=k[e];k[e]?a&&a!==t&&debugLog("collision for "+e,t,a):k[e]=t}function O(){if((0,r.getCurrentTab)()===r.tabReports){var e=S(),t=geByClass1("_reports_"+e+"_wrap",r.reportList),a=geByClass1("_report_show_more",domPN(t)),n=domPN(a),o=window.innerHeight||document.documentElement||bodyNode.clientHeight;C=scrollGetY(),isVisible(n)&&(0,r.activeTab)()===r.tabReports&&o+C>a.offsetTop&&a.click()}}function P(){clearTimeout(w),w=setTimeout(L.pbind(S(),T()),1e3)}function $(){var e=(0,l.createModule)({handlers:(e,t)=>{t(r.reportList,"mouseover","report_steps",x),t(r.reportList,"click","report_steps",(e=>A(e))),t(r.reportList,"click","fast_pattern",(e=>function(e){var t=e.target,a=t.getAttribute("data-fast-pattern-type"),n={act:"apply_pattern",pattern:"/",simplify:32,search_period:72,duration:8,bantype:0,comment:"#child_porn Боты или взломанные с ДП-контентом для увода в Телеграм (автошаблон из жалобы на комментарий)",pattern_added_short_output:!0},o={};switch(a){case"photo":o={conditions:`type = 3500 && album_id IN (-7, -8) && kid = '${t.getAttribute("data-kid")}'`};break;case"video":o={conditions:`type = 2600 && content_id = ${t.getAttribute("data-content_id")}`};break;case"docs":r=t.getAttribute("data-md5"),i=t.getAttribute("data-size"),o={conditions:`type = 5300 && md_five = '${r}' && size = ${i} && ext IN ('gif', 'png', 'jpg')`}}var r,i;if(0!==Object.keys(o).length){var s=u({},n,{},o,{type:a});ajax.post("noSpam.php",s,{onDone:e=>{t.outerHTML=`<span>${e.pattern_applied_text}</span>`},onFail:()=>{topError("Ошибка при установке шаблона"),t.outerHTML="<span>Ошибка</span>"},showProgress:lockButton.pbind(t),hideProgress:unlockButton.pbind(t)})}}(e))),t(r.reportList,"mouseover","report_info_ban_tooltip",(e=>function(e){var t=e.target,a=domData(t,"action-index"),n=b[a].ban_tt;n&&showTooltip(t,{text:n,dir:"down",hasover:1,shift:[22,5,0]})}(e))),t(r.reportList,"mouseover","report_info_ua_hash",(e=>function(e){var t=e.target,a=domData(t,"ua-hash"),n=k[a];showTooltip(t,{text:n||"[NULL]",dir:"down",hasover:1,shift:[22,5,0]})}(e))),e(document,"scroll",O),t(r.reportList,"click","_report_show_more",(e=>{var t=domData(e.target,"need-shift");D(S(),t)})),t(r.reportTabs,"click","report_filter",(e=>function(e){var t=e.target,a=domData(t,"type"),n=domData(t,"subtype"),o=geByClass("report_filter",r.reportTabs),i=geByClass("report_subfilter",r.reportTabs),s=geByClass1(f,r.reportList);if(!a)return!1;o.forEach((e=>{hasClass(e,g)&&removeClass(e,g),domData(e,"type")!==a||domData(e,"subtype")||addClass(e,g)}));var l=!1,c=!1;i.forEach((e=>{removeClass(e,h),removeClass(e,g),domData(e,"type")===a&&(addClass(e,h),l=!0),domData(e,"subtype")===n&&(addClass(e,g),c=!0)}));var p=geByClass1("hr",r.reportTabs);if(l?show(p):hide(p),l&&!c){var d=geByClass1(h,r.reportTabs);addClass(d,g)}domData(s,"type")!==a&&(removeClass(s,f),addClass(ge("reports_"+a),f)),L(a,n)}(e))),t(r.reportList,"click","_report_btn_update",(e=>{L(S(),T())})),t(r.reportList,"click",p.CONTENT_STORY_THUMBNAIL,(e=>{(0,o.showUserStory)(e.target)})),t(r.reportTabs,"mouseover","settings_dots_wrap",(e=>{var t=geByClass1("settings_dots_wrap");showTooltip(t,{black:!0,text:getTemplate("reports_group_message_tab_tooltip"),className:"group_messages_settings_tt",slideY:15,shift:[98,100,20],dir:"top",showdt:300,hidedt:100,hasover:!0,onCreate:function(){var e;e=ge("search_shift_filter"),cur.hoursShiftSlider=new Slider(e,{width:200,height:100,debounce:10,size:2,value:parseFloat(nav.objLoc.shift/23)||0,onChange:e=>{(0,s.updateUrl)({shift:parseInt(23*e)}),P()},formatHint:e=>langNumeric(parseInt(23*e),["","%s час назад","%s часа назад","%s часов назад"])}),(0,s.initRadioButtons)("group_messages_reports_sorting","sorting_radio_filter_wrap",1)}})}))}});cur.destroy.push((()=>{(0,l.destroyModule)(e)}))}var j={initUpdate:function(){scrollToY(C)}}},363983:(e,t,a)=>{"use strict";a.d(t,{rollbackDocMailSpamer:()=>o,rollbackDocWallSpamer:()=>r,rollbackJpgMailSpamer:()=>i,rollbackJpgWallSpamer:()=>s,rollbackPngMailSpamer:()=>l,rollbackPngWallSpamer:()=>c,rollbackDocSpamer:()=>p,rollbackPhotoSpamer:()=>d,rollbackPhotoSpamerFromWall:()=>u,rollbackPhotoSpamerFromMail:()=>_,rollbackVideoSpamer:()=>m,rollbackVideoSpamerFromWall:()=>h,rollbackVideoSpamerFromMail:()=>g,reportsRollbackSpamerDone:()=>b,reportsRollbackSpamerFail:()=>k});var n="green_item";function o(e,t,a,n,o,r){var i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:t=>f(t,e,"rollback_docmail_spamer"),s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:v;ajax.post("noSpam.php",{act:"rollback_docmail_spamer",uid:e,hash:t,act_type:a,spam_date:n,to_id:o,to_msg_id:r},{onDone:i,onFail:s})}function r(e,t,a,n,o,r){var i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:t=>f(t,e,"rollback_docwall_spamer"),s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:v;ajax.post("noSpam.php",{act:"rollback_docwall_spamer",uid:e,hash:t,act_type:a,spam_date:n,owner_id:o,msg_id:r},{onDone:i,onFail:s})}function i(e,t,a,n,o,r){var i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:t=>f(t,e,"rollback_jpgmail_spamer"),s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:v;ajax.post("noSpam.php",{act:"rollback_jpgmail_spamer",uid:e,hash:t,act_type:a,spam_date:n,to_id:o,to_msg_id_id:r},{onDone:i,onFail:s})}function s(e,t,a,n,o,r){var i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:t=>f(t,e,"rollback_jpgwall_spamer"),s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:v;ajax.post("noSpam.php",{act:"rollback_jpgwall_spamer",uid:e,hash:t,act_type:a,spam_date:n,owner_id:o,msg_id:r},{onDone:i,onFail:s})}function l(e,t,a,n,o,r){var i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:t=>f(t,e,"rollback_pngmail_spamer"),s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:v;ajax.post("noSpam.php",{act:"rollback_pngmail_spamer",uid:e,hash:t,act_type:a,spam_date:n,to_id:o,to_msg_id:r},{onDone:i,onFail:s})}function c(e,t,a,n,o,r){var i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:t=>f(t,e,"rollback_pngwall_spamer"),s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:v;ajax.post("noSpam.php",{act:"rollback_pngwall_spamer",uid:e,hash:t,act_type:a,spam_date:n,owner_id:o,msg_id:r},{onDone:i,onFail:s})}function p(e,t,a,n,o,r){var i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:t=>f(t,e,"rollback_doc_spamer"),s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:v;ajax.post("noSpam.php",{act:"rollback_doc_spamer",uid:e,hash:t,act_type:a,spam_date:n,owner_id:o,doc_id:r},{onDone:i,onFail:s})}function d(e,t,a,n,o,r){var i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:t=>f(t,e,"rollback_photo_spamer"),s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:v;ajax.post("noSpam.php",{act:"rollback_photo_spamer",uid:e,hash:t,act_type:a,spam_date:n,owner_id:o,photo_id:r},{onDone:i,onFail:s})}function u(e,t,a,n,o,r){var i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:t=>f(t,e,"rollback_photo_spamer"),s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:v;ajax.post("noSpam.php",{act:"rollback_photo_spamer_from_wall",uid:e,hash:t,act_type:a,spam_date:n,owner_id:o,msg_id:r},{onDone:i,onFail:s})}function _(e,t,a,n,o,r){var i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:t=>f(t,e,"rollback_photo_spamer"),s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:v;ajax.post("noSpam.php",{act:"rollback_photo_spamer_from_mail",uid:e,hash:t,act_type:a,spam_date:n,to_id:o,to_msg_id:r},{onDone:i,onFail:s})}function m(e,t,a,n,o,r){var i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:t=>f(t,e,"rollback_video_spamer"),s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:v;ajax.post("noSpam.php",{act:"rollback_video_spamer",uid:e,hash:t,act_type:a,spam_date:n,owner_id:o,video_id:r},{onDone:i,onFail:s})}function h(e,t,a,n,o,r){var i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:t=>f(t,e,"rollback_video_spamer"),s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:v;ajax.post("noSpam.php",{act:"rollback_video_spamer_from_wall",uid:e,hash:t,act_type:a,spam_date:n,owner_id:o,msg_id:r},{onDone:i,onFail:s})}function g(e,t,a,n,o,r){var i=arguments.length>7&&void 0!==arguments[7]?arguments[7]:v;ajax.post("noSpam.php",{act:"rollback_video_spamer_from_mail",uid:e,hash:t,act_type:a,spam_date:n,to_id:o,to_msg_id:r},{onDone:oneDone,onFail:i})}function f(e,t,a){ge(a+t).innerHTML=e,function(e){var t=ge("console_item_"+e);hasClass(t,n)&&removeClass(t,n),addClass(t,"red_item")}(t)}function v(){return null}function b(e){ge("spamer_by_"+e).outerHTML="<span style = 'color: green'> Добавлен </span>",document.getElementById(e).classList.add("processed")}function k(e){ge("spamer_by_"+e).outerHTML="<span style = 'color: red'> Неудача </span>"}},915087:(e,t,a)=>{"use strict";a.d(t,{noSpamSuspicious:()=>n});var n={selected:"ua_hash",updateOnSelect:function(){return n.getByType(n.selected)},getSpamType:function(){return isObject(this.spamtype)?this.spamtype._selected[0]:"wall"},getPeriod:function(){return isObject(this.period)?this.period._selected[0]:1},getByType:function(e){var t=ge("suspicious_table"),a=geByClass1("summary_tab_sel","suspicious_tabs"),n=isVisible("suspicious_tabs")?0:1,o=this;this.selected=e;var r=ge("suspicious_spamtype"),i=ge("suspicious_period"),s=geByClass("_suspicious_msg"),l=geByClass1("_suspicious_"+e+"_msg");each(s,(function(e,t){hide(t)})),show(l),"hashtags"==e?hide(r):show(r),"users"==e&&hide(r,i),n&&(t=ge("suspicious")),removeClass(a,"summary_tab_sel");var c={act:"a_get_suspicious",type:e,spamtype:this.getSpamType(),period:this.getPeriod(),need_tabs:n};addClass("suspicious_"+e,"summary_tab_sel"),ajax.post("noSpam.php",c,{onDone:function(e){if(!e)return topError(getLang("nospam_suspicious_data_error"));t.innerHTML=e,o.initInlineDropdown()},progress:"suspicious_progress"})},initInlineDropdown:function(){var e={withArrow:!0,keepTitle:!0,autoShow:!0,autoHide:300,onSelect:n.updateOnSelect},t=extend({items:cur.options.spamtypes,selected:"wall"},e),a=extend({items:[[1,"Один час"],[2,"Два часа"],[5,"5 часов"],[10,"10 часов"],[24,"Сутки"]],selected:1},e);this.spamtype||(this.spamtype=new InlineDropdown("suspicious_spamtype",t)),this.spamtype._els.valueEl.innerHTML=this.spamtype._selected[1],this.period||(this.period=new InlineDropdown("suspicious_period",a)),this.period._els.valueEl.innerHTML=this.period._selected[1]}}},768099:(e,t,a)=>{"use strict";a.d(t,{noSpamTemplates:()=>o});a(59357),a(820075);var n=a(341585),o=function(e){this.selected=0,extend(this,e),this.templates=JSON.parse(e.templates)};o.prototype={addTemplate:function(){showBox("noSpam.php",{act:this.acts.add},{params:{width:430,dark:1,progress:"add_template"}})},saveTemplate:function(e){var t=cur[e],a=t.selected||0;if(ge("add_template_title")&&ge("add_template_text")){var n=trim(ge("add_template_title").value),o=trim(ge("add_template_text").value);if(!n)return notaBene("add_template_title");if(!o)return notaBene("add_template_text");var r={act:t.acts.save,title:n,text:o,hash:t.hash,template_id:a};ajax.post("noSpam.php",r,{onDone:function(e,a){var n=ge(t.links);n.innerHTML=e,hasClass(n,"template_links")||addClass(n,"template_links"),t.templates=JSON.parse(a),curBox().hide()},progress:a?"edit_template":"add_template"})}},editTemplate:function(){var e={act:this.acts.edit,template_id:this.selected,hash:this.hash};showBox("noSpam.php",e,{params:{width:430,dark:1,progress:"edit_template"}})},deleteTemplate:function(){var e=this;if(!this.selected)return!1;showFastBox({title:"Удаление шаблона",width:430,dark:1,progress:"delete_condition"},getLang("nospam_delete_template"),getLang("global_delete"),(function(){var t=e.selected,a={act:e.acts.remove,template_id:t,hash:e.hash};ajax.post("noSpam.php",a,{onDone:function(t,a){var n=ge(e.links);n.innerHTML=t,e.deselectTemplate(),e.templates=JSON.parse(a),isObject(e.templates)||removeClass(n,"template_links"),curBox().hide()},progress:"delete_condition"})}),getLang("global_cancel"))},selectTemplate:function(e){if(e){var t=this.templates[e];this.selected=e;var a=entityDecode(t.text);(0,n.setConditions)(a),this.label.innerHTML=t.title+": ",addClass(this.wrap,"template_selected")}},selectCommentTemplate:function(e){if(e){var t=this.templates[e];this.selected=e;var a=entityDecode(t.text);this.editComment(a),this.label.innerHTML=t.answer_name+": ",addClass(this.wrap,"template_selected")}},editComment:function(e){if(val(this.input,e),this.input.autosize)return this.input.autosize.update();autosizeSetup("comment_input",{minHeight:32})},getFromLocal:function(e){var t=localStorage.comments_templates_storage;ge("get_local_comments");try{t=JSON.parse(t)}catch(e){}return t?t&&e?(each(t,(function(e,t){var a=function(e,t){var a=ge("comment_template_links");hasClass(a,"template_links")||addClass(a,"template_links"),cur.comment.links.innerHTML=e,cur.comment.templates=JSON.parse(t)};setTimeout((function(){var e=t[1];ajax.post("noSpam.php",{act:"save_comment_template",title:e.name,text:e.comment,hash:opts.comment_hash,template_id:0},{onDone:a})}),1e3*e)})),curBox().hide()):void showBox("noSpam.php",{act:"apply_comments_export"},{params:{width:430,dark:1,progress:"export_progress"}}):showFastBox({title:"Перенос шаблонов",dark:1},"К сожалению, не удалось найти ни одного комментария.")},deselectTemplate:function(){var e=this.selected,t=this.templates[e];if(t){var a=entityDecode(this.templates[e].text);t&&this.input.value==a&&val(this.input,""),this.label.innerHTML=this.label_html,removeClass(this.wrap,"template_selected"),delete this.selected}},editSort:function(){var e={act:this.acts.sort,hash:this.hash};showBox("noSpam.php",e,{params:{width:430,dark:1,progress:"sort_template"}})},saveSort:function(e,t,a,n,o){var r=cur[e],i={hash:t,act:r.acts.sort_save,tid:a.id.replace("template",""),tpos:a.dataset.pos,after_id:n&&n.dataset?n.dataset.pos:"",before_id:o&&o.dataset?o.dataset.pos:""};ajax.post("noSpam.php",i,{onDone:function(e,t){box=curBox(),box.content(e[2]),box.evalBox(t),box.setOptions({onHide:function(){debugLog(e),r.links.innerHTML=e[0],r.templates=JSON.parse(e[1])}})},progress:"sort_template"})}}},198019:(e,t,a)=>{"use strict";a.d(t,{consoleWrap:()=>n,patternWrap:()=>o,reportList:()=>r,reportTabs:()=>i,tabReports:()=>_,tabPattern:()=>m,switchTab:()=>g,getCurrentTab:()=>f,activeTab:()=>v,getCustomOption:()=>k,init:()=>C});var n,o,r,i,s,l=a(341585),c=a(25961),p=a(581164),d=a(54),u=a(610124),_="reports",m="pattern",h="_nospam_option_action";function g(e,t){var a=geByClass1("_nospam_tab_switch_"+e);uiTabs.switchTab(domFC(a)),t&&(a=domChildren(a));var n=geByClass("nospam_tab"),o=domData(a,"tab-id");return n.forEach((function(e){domData(e,"id")!=o?hide(e):show(e)})),(0,d.updateUrl)({tab:e}),"patterns"===e?p.noSpamPatterns.initUpdate():e===_?c.noSpamReports.initUpdate():e===m&&scrollToTop(),!1}function f(){return(0,d.getUrlParam)("tab")}function v(){var e=domPN(geByClass1("ui_tab_sel"));return domData(e,"tab-id")}function b(e){geByClass(h,s).forEach((t=>{var a=domData(t,"option"),n=+e[a],o=window.cur.lang["nospam_options_"+a];o&&(t.innerHTML=o[n]),domData(t,"option-state",n)})),cur.options.custom_options=e}function k(e){var t=window.cur;return!!t.options.custom_options&&t.options.custom_options[e]}function y(e,t,a){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o={width:185,height:500,multiselect:!1};return e.includes("spamtype")&&extend(o,{onChange:e=>{window["ConditionsEditor"+n].setSection(e)}}),new Dropdown(document.getElementById(e),t,extend(o,{selectedItems:a}))}function w(e){extend(cur,{uiSpamtype:y("spamtype",e.spamtypes,cur.options.spamtype),uiSpamtype2:y("spamtype2",e.spamtypes,cur.options.spamtype2,2),uiSimplify:y("simplify_select",e.simplifies,cur.options.simplify),uiBan:y("ban_select",e.bans,cur.options.ban),uiDuration:y("duration_select",e.durations,cur.options.duration),uiSearchPeriod:y("search_period_select",e.searchperiods,cur.options.searchperiod)}),placeholderSetup("comment_input"),val("comment_input")&&autosizeSetup("comment_input",{minHeight:30}),geByClass("conditions_input").forEach((function(e){placeholderSetup("comment_input"),val(e)&&autosizeSetup("comment_input",{minHeight:30})}));var t=ge("page_body");o=geByClass1("pattern_wrap",t),n=geByClass1("console_wrap",t),i=geByClass1("reports_tabs",t),r=geByClass1("_reports_list",t),s=geByClass1("_nospam_options",t);var a=geByClass1("nospam_patterns_wrap",t),d=(0,u.createModule)({handlers:(e,t)=>{t(a,"click","_abort_pattern_mild",(e=>(0,p.abortPatternMild)(domData(e.target,"id")))),t(s,"click",h,(e=>function(e){var t={act:"a_set_custom_option",name:domData(e,"option"),state:1^domData(e,"option-state")};ajax.post("noSpam.php",t,{onDone:b,showProgress:lockActionsMenuItem.pbind(e),hideProgress:unlockActionsMenuItem.pbind(e)})}(e.target)))}});cur.destroy.push((()=>{(0,u.destroyModule)(d)})),(0,l.mount)(),(0,c.mount)()}function C(e){var t=(0,u.createMutations)(w);t.callMutations;(0,t.bindMutations)(e)}},54:(e,t,a)=>{"use strict";a.d(t,{PHP_DAY:()=>o,MILLISECONDS_MULTIPLIER:()=>r,TARGET_BLANK:()=>i,EVENT_MOUSEDOWN:()=>s,EVENT_KEYDOWN:()=>l,EVENT_SCROLL:()=>c,getCurrentUrl:()=>p,updateUrl:()=>d,getUrlParam:()=>u,getAct:()=>_,openInNewTab:()=>m,getTime:()=>h,getCurrentDayBoundaries:()=>g,getDayBoundaries:()=>f,timestampToSeconds:()=>v,showLoading:()=>b,hideLoading:()=>k,hideCurrentBox:()=>y,initRadioButtons:()=>w,isSpecialKeyPressed:()=>C,isIntegerString:()=>S});var n=a(654612),o=86400,r=1e3,i="_blank",s="mousedown",l="keydown",c="scroll";function p(){return nav.strLoc}function d(e){var t={0:nav.objLoc[0],act:nav.objLoc.act};nav.setLoc(extend(t,e))}function u(e){return nav.objLoc[e]}function _(){return u("act")}function m(e){window.open(e,"_blank").focus()}function h(){return v(Date.now())}function g(){return f((new Date).getTime())}function f(e){var t=new Date(e),a=new Date(e);return t.setHours(0,0,0,0),a.setHours(23,59,59,999),[t.getTime(),a.getTime()]}function v(e){return Math.floor(e/r)}function b(){var e=new n.MessageBox;e.setOptions({title:!1,hideButtons:!0}).show(),hide(boxLayerBG),hide(e.bodyNode),show(boxLoader),boxRefreshCoords(boxLoader)}function k(){curBox&&curBox()&&curBox().hide()}function y(){curBox().hide()}function w(e,t,a){window.radioBtns[e]={val:a,els:Array.prototype.slice.apply(geByClass("radiobtn",geByClass1(t)))}}function C(e){return e.ctrlKey||e.metaKey&&browser.mac}function S(e){return/^-?(0|[1-9]\d*)$/.test(e)}},667784:(e,t,a)=>{"use strict";a.d(t,{addDelegateEvent:()=>s,removeDelegateEvent:()=>l});a(530522),a(66108),a(579665),a(95767),a(991181),a(296253),a(751876);function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var a=[],n=!0,o=!1,r=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(a.push(i.value),!t||a.length!==t);n=!0);}catch(e){o=!0,r=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw r}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(a);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var r=new window.Map;function i(e){var t=r.get(e.currentTarget);if(t){var a=t[e.type];if(a)for(var o,i=0;i<a.length;i++){var s=n(a[i],2),l=s[0],c=s[1],p=void 0;if(hasClass(e.target,l)?p=c(e,e.target):(o=gpeByClass(l,e.target,e.currentTarget))&&(p=c(e,o)),!1===p)break}}}function s(e,t,a,n,o){var s=r.get(e);s||(r.set(e,{}),s=r.get(e));for(var l=t.split(" "),c=0;c<l.length;c++){var p=l[c];s[p]||(s[p]=[],o?addEvent(e,p,i,!1,!1,o):addEvent(e,p,i)),s[p].push([a,n])}}function l(e,t,a,n){var o=r.get(e);o&&(t.split(" ").forEach((t=>{o[t]&&(o[t]=o[t].filter((e=>e[0]!==a||e[1]!==n)),0===o[t].length&&removeEvent(e,t,i))})),0===Object.keys(o).map((e=>o[e].length)).reduce(((e,t)=>e+t))&&r.delete(e))}},938899:(e,t,a)=>{"use strict";a.d(t,{SelectTable:()=>m});var n,o=a(570655),r=a(667294),i=a(985903),s=a(973714),l=a(611658),c=a(877199),p=a(250519),d=a(600242),u=a(832199),_=a(674041);!function(e){e.TOGGLE="toggle",e.SELECT="select",e.DESELECT="deselect"}(n||(n={}));var m=function(e){function t(t){var a=e.call(this,t)||this;return a.state={lastSelectedIndex:0,lastSelectedMode:n.SELECT},a.handleCheckBoxHeaderClick=a.handleCheckBoxHeaderClick.bind(a),a}return(0,o.__extends)(t,e),t.prototype.selectionChange=function(e,t){var a=this,o=t.map((function(t,o){switch(e){case n.TOGGLE:return t?!a.props.selection[o]:a.props.selection[o];case n.SELECT:return!!t||a.props.selection[o];case n.DESELECT:return!t&&a.props.selection[o]}}));this.props.onSelection(o)},t.prototype.selectSingleRow=function(e){var t=this.props.selection.map((function(t,a){return a===e}));this.selectionChange(n.TOGGLE,t)},t.prototype.handleCheckBoxHeaderClick=function(e){var t=this.props.selection.map((function(){return!0}));e.altKey?this.selectionChange(n.TOGGLE,t):this.props.selection.reduce((function(e,t){return e&&t}))?this.selectionChange(n.DESELECT,t):this.selectionChange(n.SELECT,t)},t.prototype.handleRowClick=function(e,t){var a;null===(a=document.getSelection())||void 0===a||a.removeAllRanges();var o=e.target;if(o.className.includes("CheckBox__")&&e.preventDefault(),"A"!==o.nodeName){var r=this.props.selection[t.index]?n.DESELECT:n.SELECT;this.setState({lastSelectedIndex:t.index,lastSelectedMode:r}),e.shiftKey?this.handleShiftSelect(t.index):this.selectSingleRow(t.index)}},t.prototype.handleShiftSelect=function(e){var t=e-this.state.lastSelectedIndex,a=this.state.lastSelectedIndex,n=e+1;t<0&&(a=e,n=this.state.lastSelectedIndex);var o=this.props.selection.map((function(e,t){return t>=a&&t<n}));this.selectionChange(this.state.lastSelectedMode,o)},t.prototype.handleMouseEnter=function(e,t){var a;window.cur.mousedown&&(null===(a=document.getSelection())||void 0===a||a.removeAllRanges(),this.selectSingleRow(t.index))},t.prototype.getRowClassName=function(e){var t=this.props,a=t.selection[e],n=t.muted[e],o=t.data[e].isFirstInGroup,r=[];return a&&r.push("SelectTable__row--selected"),n&&r.push("SelectTable__row--muted"),o&&r.push("SelectTable__row--firstInGroup"),r.join(" ")},t.prototype.render=function(){var e=this,t=this.props,a=t.data.map((function(e,a){var n=t.selection[a];return e.checkbox=r.createElement(_.default,{checked:n,className:"SelectTable__checkBox"}),e})),n=!t.selection.some((function(e){return!1===e})),m=(0,o.__spreadArray)([{Header:function(){return r.createElement(_.default,{className:"SelectTable__checkBox",checked:n,onClick:e.handleCheckBoxHeaderClick})},accessor:"checkbox",width:40}],(0,o.__read)(t.columns));return r.createElement(i.default,{className:"SelectTable",data:a,columns:m,TableComponent:s.SelectTableContainerComponent,TheadComponent:l.SelectTableHeadComponent,TrComponent:c.SelectTableRowComponent,TdComponent:p.SelectTableCellComponent,ThComponent:d.SelectTableHeaderCellComponent,TrGroupComponent:u.SelectTableRowGroupComponent,resizable:!1,sortable:!1,pageSize:a.length,showPageSizeOptions:!1,showPagination:!1,getTdProps:function(t,a){return{onMouseDown:function(t){return e.handleRowClick(t,a)}}},getTrProps:function(t,a){return{className:e.getRowClassName(a.index),onMouseEnter:function(t){return e.handleMouseEnter(t,a)}}}})},t}(r.Component)},250519:(e,t,a)=>{"use strict";a.d(t,{SelectTableCellComponent:()=>o});var n=a(667294),o=function(e){return n.createElement("div",{className:"SelectTable__cell",role:"gridcell",style:e.style,onMouseDown:e.onMouseDown},e.children)}},973714:(e,t,a)=>{"use strict";a.d(t,{SelectTableContainerComponent:()=>o});var n=a(667294),o=function(e){return n.createElement("div",{className:"SelectTable__container"},e.children)}},611658:(e,t,a)=>{"use strict";a.d(t,{SelectTableHeadComponent:()=>o});var n=a(667294),o=function(e){return n.createElement("div",{className:"SelectTable__header",role:"row"},e.children)}},600242:(e,t,a)=>{"use strict";a.d(t,{SelectTableHeaderCellComponent:()=>o});var n=a(667294),o=function(e){return n.createElement("div",{className:"SelectTable__headerCell "+e.className,role:"columnheader",style:e.style},e.children)}},877199:(e,t,a)=>{"use strict";a.d(t,{SelectTableRowComponent:()=>o});var n=a(667294),o=function(e){return n.createElement("div",{className:"SelectTable__row "+e.className,role:"row",onMouseEnter:e.onMouseEnter},e.children)}},832199:(e,t,a)=>{"use strict";a.d(t,{SelectTableRowGroupComponent:()=>o});var n=a(667294),o=function(e){return n.createElement("div",{className:"SelectTable__rowGroup",role:"rowgroup"},e.children)}},564793:(e,t,a)=>{"use strict";a.d(t,{LinksType:()=>o,ConsoleLinks:()=>d});var n,o,r=a(570655),i=a(667294),s=a(377381),l=a(889366),c=a(641388);!function(e){e.DOMAINS="domains",e.DOMAINS_HIGHER="higher_level_domains",e.EXTERNAL_LINKS="external_links"}(o||(o={}));var p=((n={})[o.DOMAINS]="Домены",n[o.DOMAINS_HIGHER]="Домены верхних уровней",n[o.EXTERNAL_LINKS]="Ссылки",n),d=function(e){function t(t){var a=e.call(this,t)||this,n=a.getEnabledTabs();return a.state={comment:window.cur.getLinksBanComment(),selectedTab:0!==t.linksDataRaw[o.DOMAINS].length?o.DOMAINS:o.EXTERNAL_LINKS,enabledTabs:n,higherDomainsLevel:0,linksData:a.initLinksData(n)},a.handleCommentInput=a.handleCommentInput.bind(a),a.changeDomainLevel=a.changeDomainLevel.bind(a),a.handleBanResults=a.handleBanResults.bind(a),a}return(0,r.__extends)(t,e),t.prototype.getEnabledTabs=function(){var e=this.props,t=[];return e.linksDataRaw[o.DOMAINS].length>0&&t.push(o.DOMAINS),e.linksDataRaw[o.DOMAINS_HIGHER].length>0&&e.linksDataRaw[o.DOMAINS_HIGHER][0].length>0&&t.push(o.DOMAINS_HIGHER),e.linksDataRaw[o.EXTERNAL_LINKS].length>0&&t.push(o.EXTERNAL_LINKS),t},t.prototype.initLinksData=function(e){var t,a=this,n=((t={})[o.DOMAINS]=[],t[o.DOMAINS_HIGHER]=[],t[o.EXTERNAL_LINKS]=[],t);return e.forEach((function(e){var t=a.props.linksDataRaw[e];switch(e){case o.DOMAINS:case o.EXTERNAL_LINKS:n[e]=t.map((function(e,t){return(0,r.__assign)((0,r.__assign)({},e),{index:t})}));break;case o.DOMAINS_HIGHER:n[e]=t.map((function(e){return e.map((function(e,t){return(0,r.__assign)((0,r.__assign)({},e),{index:t})}))}))}})),n},t.prototype.handleCommentInput=function(e){var t=e.target;window.cur.setLinksBanComment(t.value),this.setComment(t.value)},t.prototype.setComment=function(e){this.setState({comment:e})},t.prototype.syncWithCurComment=function(){var e=window.cur.getLinksBanComment();e!==this.state.comment&&this.setComment(e)},t.prototype.changeDomainLevel=function(e){var t=this.state.higherDomainsLevel+e;t<0||t>=this.props.linksDataRaw[o.DOMAINS_HIGHER].length||(this.setState({higherDomainsLevel:t}),this.forceUpdate())},t.prototype.handleBanResults=function(e,t,a){var n=(0,r.__assign)({},this.state.linksData),i=t===o.DOMAINS_HIGHER?n[t][a]:n[t];e.forEach((function(e){e.success&&(i[e.index].is_banned=!0)})),this.setState({linksData:n})},t.prototype.renderTabsContent=function(){var e=this.state.selectedTab,t=this.state.linksData[e],a=e;return e===o.DOMAINS_HIGHER&&(t=this.state.linksData[e][this.state.higherDomainsLevel],a+=this.state.higherDomainsLevel),i.createElement(s.LinksTab,{type:e,key:a,rowsData:t,banHash:this.props.banHash,comment:this.state.comment,higherDomainsLevel:this.state.higherDomainsLevel,hasDomainLevelsAbove:this.state.higherDomainsLevel+1<this.props.linksDataRaw[o.DOMAINS_HIGHER].length,hasDomainLevelsBelow:this.state.higherDomainsLevel>0,changeDomainLevel:this.changeDomainLevel,updateBanStatus:this.handleBanResults})},t.prototype.renderTabs=function(){return this.state.enabledTabs.map((function(e){return i.createElement("span",{key:e},p[e])}))},t.prototype.selectTab=function(e){this.setState({selectedTab:e})},t.prototype.render=function(){var e=this;if(0===this.state.enabledTabs.length)return null;var t=this.renderTabsContent();return i.createElement(i.Fragment,null,i.createElement(l.default,{placeholder:"Комментарий к блокировке ссылок и доменов",onChange:this.handleCommentInput,value:this.state.comment}),i.createElement(c.default,{active:this.state.selectedTab,onTabClick:function(t,a){e.selectTab(a)}},this.renderTabs()),t)},t}(i.Component)},377381:(e,t,a)=>{"use strict";a.d(t,{LinksTab:()=>_});var n=a(570655),o=a(667294),r=a(938899),i=a(181395),s=a(293680),l=a(341585),c=a(564793),p=[{Header:"Домен",accessor:"domain"},{Header:"Путь",accessor:"path"},{Header:"К-во",accessor:"count",maxWidth:50},{Header:"Поле",accessor:"field_name",maxWidth:100}],d=[{Header:"Ссылка",accessor:"link"},{Header:"К-во",accessor:"count",maxWidth:50},{Header:"Поле",accessor:"field_name",maxWidth:100}],u=[{Header:"Домен",accessor:"domain"},{Header:"Поддомен",accessor:"subdomain"},{Header:"К-во",accessor:"count",maxWidth:50},{Header:"Поле",accessor:"field_name",maxWidth:100}],_=function(e){function t(t){var a=e.call(this,t)||this;return a.state={selection:t.rowsData.map((function(){return!1})),banInProgress:{status:!1,reason:null}},a.getSelectedRows=a.getSelectedRows.bind(a),a.handleRowSelection=a.handleRowSelection.bind(a),a.blockSelected=a.blockSelected.bind(a),a.selectByFilter=a.selectByFilter.bind(a),a.addSelectedToCondition=a.addSelectedToCondition.bind(a),a}return(0,n.__extends)(t,e),t.prototype.blockSelected=function(e){var t=this,a=this.props,n=this.getLinksForBan();if(0!==n.length){this.setState({banInProgress:{status:!0,reason:e}});var o={links:"",reason:e,comment:a.comment,hash:a.banHash,act:"block_links_mass",is_domains_ban:0};if(this.isDomainsTab())o.is_domains_ban=1;else if(!this.isExternalLinksTab())return;var r=function(e){t.setState({banInProgress:{status:!1,reason:null}}),t.props.updateBanStatus(e,t.props.type,t.props.higherDomainsLevel)};n.forEach((function(e){o.links=JSON.stringify([e]),s.ajax.post("noSpam.php",o,{onDone:r})}))}},t.prototype.isDomainsTab=function(){return this.props.type===c.LinksType.DOMAINS||this.props.type===c.LinksType.DOMAINS_HIGHER},t.prototype.isExternalLinksTab=function(){return this.props.type===c.LinksType.EXTERNAL_LINKS},t.prototype.getLinksForBan=function(){var e=this;return this.getSelectedRows().filter((function(e){return!e.is_banned})).map((function(t){return e.isDomainsTab()?{domain:t.name,link_example:t.link,index:t.index}:e.isExternalLinksTab()?{url:t.url,index:t.index}:void 0}))},t.prototype.getSelectedRows=function(){var e=this;return this.props.rowsData.filter((function(t,a){return e.state.selection[a]}))},t.prototype.selectByFilter=function(e){var t=this.props.rowsData.map((function(t){return e(t)}));this.handleRowSelection(t)},t.prototype.handleRowSelection=function(e){this.setState({selection:e})},t.prototype.addSelectedToCondition=function(e){var t=this.getSelectedRows();if(0!==t.length){var a=[];switch(e){case i.ConditionAddOption.DOMAIN_NAME:a=t.map((function(e){return e.name}));break;case i.ConditionAddOption.LINK_URL:a=t.map((function(e){return e.url}));break;case i.ConditionAddOption.TOP_LEVEL_DOMAIN:t.forEach((function(e){var t=e.name.slice(e.name.lastIndexOf("."));a.includes(t)||a.push(t)}))}var n="@check_regex('("+(a=a.map((function(e){return(0,l.escapeRegexConditionsInput)(e)}))).join("|")+")', message)";(0,l.setConditions)(n)}},t.prototype.getDomainsForTable=function(){return this.props.rowsData.map((function(e,a){return{domain:t.getMainLinkElement(e.name,e.is_banned,!0),path:e.path,field_name:t.getFieldLinkElement(e.field_name,e.sample_index),sampleIndex:e.sample_index,count:e.count,isFirstInGroup:0!==a&&""!==e.top_domain}}))},t.prototype.getExternalLinksForTable=function(){return this.props.rowsData.map((function(e){return{link:t.getMainLinkElement(e.url,e.is_banned,!1),field_name:t.getFieldLinkElement(e.field_name,e.sample_index),sampleIndex:e.sample_index,count:e.count}}))},t.prototype.getHigherLevelDomainsForTable=function(){return this.props.rowsData.map((function(e){return{domain:t.getMainLinkElement(e.name,e.is_banned,!0),subdomain:e.subdomain_name,field_name:t.getFieldLinkElement(e.field_name,e.sample_index),sampleIndex:e.sample_index,count:e.count}}))},t.scrollToSample=function(e){var t,a=null===(t=document.querySelector(".console_items_list"))||void 0===t?void 0:t.children[e];a&&a.scrollIntoView()},t.getFieldLinkElement=function(e,a){return o.createElement("a",{onClick:function(){t.scrollToSample(a)}},e)},t.getMainLinkElement=function(e,t,a){var n=t?"LinksTab__linkBanned":"",r=a?"http://":"";return o.createElement("a",{href:"/away.php?to="+r+e,target:"_blank",className:n},e)},t.prototype.render=function(){var e,t=this.state,a=[];switch(this.props.type){case c.LinksType.DOMAINS:e=p,a=this.getDomainsForTable();break;case c.LinksType.EXTERNAL_LINKS:e=d,a=this.getExternalLinksForTable();break;case c.LinksType.DOMAINS_HIGHER:e=u,a=this.getHigherLevelDomainsForTable()}var n=t.selection.filter(Boolean).length,s=this.props.rowsData.filter((function(e){return!0===e.is_banned})).length;return o.createElement(o.Fragment,null,o.createElement(i.LinksTabControls,{selectedCount:n,totalCount:a.length,bannedCount:s,blockSelected:this.blockSelected,banInProgress:t.banInProgress,selectByFilter:this.selectByFilter,addToCondition:this.addSelectedToCondition,type:this.props.type,hasDomainLevelsAbove:this.props.hasDomainLevelsAbove,hasDomainLevelsBelow:this.props.hasDomainLevelsBelow,changeDomainLevel:this.props.changeDomainLevel}),o.createElement(r.SelectTable,{data:a,columns:e,selection:t.selection,onSelection:this.handleRowSelection,muted:this.props.rowsData.map((function(e){return e.is_banned}))}))},t}(o.Component)},181395:(e,t,a)=>{"use strict";a.d(t,{LinksBlockReason:()=>n,ConditionAddOption:()=>o,LinksTabControls:()=>p});var n,o,r=a(570655),i=a(667294),s=a(564793),l=a(46092),c=a(739519);!function(e){e[e.PHISHING=1]="PHISHING",e[e.FRAUD=3]="FRAUD"}(n||(n={})),function(e){e.DOMAIN_NAME="domain_name",e.TOP_LEVEL_DOMAIN="top_level_domain",e.LINK_URL="link_url"}(o||(o={}));var p=function(e){function t(t){var a=e.call(this,t)||this;return a.handleBlockClick=a.handleBlockClick.bind(a),a.handleAddToCondition=a.handleAddToCondition.bind(a),a.handleDomainLevelChange=a.handleDomainLevelChange.bind(a),a}return(0,r.__extends)(t,e),t.prototype.handleBlockClick=function(e){this.props.blockSelected(e)},t.prototype.handleFilterClick=function(e){this.props.selectByFilter(e)},t.prototype.handleAddToCondition=function(e){this.props.addToCondition(e)},t.prototype.handleDomainLevelChange=function(e){console.log(e),console.log(this.props.changeDomainLevel),this.props.changeDomainLevel(e)},t.prototype.getTotalLabel=function(){var e="";switch(this.props.type){case s.LinksType.DOMAINS:case s.LinksType.DOMAINS_HIGHER:e="доменов";break;case s.LinksType.EXTERNAL_LINKS:e="внешних ссылок"}return"Всего "+e+":"},t.prototype.renderDomainsControls=function(){var e=this;return i.createElement(i.Fragment,null,this.renderTotalWithBlockedRow(),this.renderBanButtonsRow(),i.createElement(l.ControlsRow,null,i.createElement(l.ControlsLabel,null,"Выделить:"),i.createElement(l.ControlsLinkButton,{onClick:function(){return e.handleFilterClick((function(e){return!e.is_banned}))}},"незабаненные"),i.createElement("div",{className:"divider"}),i.createElement(l.ControlsLinkButton,{onClick:function(){return e.handleFilterClick((function(e){return!e.path||"/"===e.path}))}},"без пути")),i.createElement(l.ControlsRow,null,i.createElement(l.ControlsLabel,null,"Добавить в условие:"),i.createElement(l.ControlsLinkButton,{onClick:function(){return e.handleAddToCondition(o.DOMAIN_NAME)}},"домены целиком"),i.createElement("div",{className:"divider"}),i.createElement(l.ControlsLinkButton,{onClick:function(){return e.handleAddToCondition(o.TOP_LEVEL_DOMAIN)}},"верхний уровень")))},t.prototype.renderExternalLinksControls=function(){var e=this;return i.createElement(i.Fragment,null,this.renderTotalWithBlockedRow(),this.renderBanButtonsRow(),i.createElement(l.ControlsRow,null,i.createElement(l.ControlsLabel,null,"Выделить:"),i.createElement(l.ControlsLinkButton,{onClick:function(){return e.handleFilterClick((function(e){return!e.is_banned}))}},"незабаненные")),i.createElement(l.ControlsRow,null,i.createElement(l.ControlsLabel,null,"Добавить в условие:"),i.createElement(l.ControlsLinkButton,{onClick:function(){return e.handleAddToCondition(o.LINK_URL)}},"ссылки целиком")))},t.prototype.renderHigherLevelDomainsControls=function(){var e=this;return i.createElement(i.Fragment,null,this.renderTotalWithBlockedRow(),this.renderDomainLevelNavigation(),this.renderBanButtonsRow(),i.createElement(l.ControlsRow,null,i.createElement(l.ControlsLabel,null,"Выделить:"),i.createElement(l.ControlsLinkButton,{onClick:function(){return e.handleFilterClick((function(e){return!e.is_banned}))}},"незабаненные")),i.createElement(l.ControlsRow,null,i.createElement(l.ControlsLabel,null,"Добавить в условие:"),i.createElement(l.ControlsLinkButton,{onClick:function(){return e.handleAddToCondition(o.DOMAIN_NAME)}},"домены целиком")))},t.prototype.renderDomainLevelNavigation=function(){var e=this,t=this.props.hasDomainLevelsAbove,a=this.props.hasDomainLevelsBelow;return t||a?i.createElement(l.ControlsRow,null,i.createElement(l.ControlsLabel,null,"Показать домены уровнем:"),t&&i.createElement(l.ControlsLinkButton,{onClick:function(){return e.handleDomainLevelChange(1)}},"выше"),t&&a&&i.createElement("div",{className:"divider"}),a&&i.createElement(l.ControlsLinkButton,{onClick:function(){return e.handleDomainLevelChange(-1)}},"ниже")):null},t.prototype.renderTotalWithBlockedRow=function(){return i.createElement(l.ControlsRow,null,i.createElement(l.ControlsLabel,null,this.getTotalLabel()),i.createElement("b",null,this.props.totalCount),i.createElement("div",{className:"divider"}),i.createElement(l.ControlsLabel,null,"Заблокировано:"),i.createElement("b",null,this.props.bannedCount))},t.prototype.renderBanButtonsRow=function(){return i.createElement(l.ControlsRow,null,i.createElement(l.ControlsLabel,null,"Выделено"),i.createElement(c.default,{className:"LinksTabControls__selectedCount",isMuted:0===this.props.selectedCount},this.props.selectedCount),i.createElement("div",{className:"divider"}),i.createElement(l.BanLinksButtons,{banInProgress:this.props.banInProgress,handleBlockClick:this.handleBlockClick,rowsNotSelected:0===this.props.selectedCount}))},t.prototype.render=function(){var e=null;switch(this.props.type){case s.LinksType.DOMAINS:e=this.renderDomainsControls();break;case s.LinksType.DOMAINS_HIGHER:e=this.renderHigherLevelDomainsControls();break;case s.LinksType.EXTERNAL_LINKS:e=this.renderExternalLinksControls()}return i.createElement("div",{className:"LinksTabControls__container"},e)},t}(i.Component)},46092:(e,t,a)=>{"use strict";a.d(t,{ControlsRow:()=>s,ControlsLabel:()=>l,ControlsLinkButton:()=>c,BanLinksButtons:()=>p});var n=a(667294),o=a(416601),r=a(118690),i=a(181395);function s(e){return n.createElement("div",{className:"LinksTabControls__row"},e.children)}function l(e){return n.createElement("span",{className:"LinksTabControls__label"},e.children)}function c(e){return n.createElement(o.default,{onClick:e.onClick,className:"LinksTabControls__linkButton"},e.children)}function p(e){return n.createElement(n.Fragment,null,n.createElement(l,null,"Блокировать выделенные c причиной:"),n.createElement(r.default,{size:"s",appearance:"secondary",onClick:function(){return e.handleBlockClick(i.LinksBlockReason.FRAUD)},loading:e.banInProgress.reason===i.LinksBlockReason.FRAUD,disabled:e.banInProgress.status||e.rowsNotSelected},"Мошенники"),n.createElement(r.default,{size:"s",appearance:"primary",onClick:function(){return e.handleBlockClick(i.LinksBlockReason.PHISHING)},loading:e.banInProgress.reason===i.LinksBlockReason.PHISHING,disabled:e.banInProgress.status||e.rowsNotSelected},"Фишинг"))}},610124:(e,t,a)=>{"use strict";a.d(t,{createMutations:()=>i,createModule:()=>c,destroyModule:()=>p});var n=a(570655),o=a(667784),r=a(49535);function i(e){return{callMutations:function(){if("function"==typeof e)throw console.trace(),new Error("Mutations are not initialized");return e},bindMutations:function(){for(var t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];if("function"!=typeof e)throw console.trace(),new Error("Mutations are already initialized");return e=e.apply(void 0,(0,n.__spreadArray)([],(0,n.__read)(t)))}}}function s(e,t,a,n){(0,r.addEvent)(t,a,n),e._registeredHandlers.push({handlerType:"bind",elem:t,types:a,handler:n})}function l(e,t,a,n,r,i){(0,o.addDelegateEvent)(t,a,n,r,i),e._registeredHandlers.push({handlerType:"delegate",elem:t,types:a,selector:n,handler:r})}function c(e){var t={_registeredHandlers:[]};return e.handlers((function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];return s.apply(void 0,(0,n.__spreadArray)([t],(0,n.__read)(e)))}),(function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];return l.apply(void 0,(0,n.__spreadArray)([t],(0,n.__read)(e)))})),t}function p(e){e._registeredHandlers.forEach((function(e){var t=e.handlerType,a=e.elem,n=e.types,i=e.handler;"delegate"===t?(0,o.removeDelegateEvent)(a,n,e.selector,i):(0,r.removeEvent)(a,n,i)})),e._registeredHandlers=[]}}}]);try{stManager.done("dist/94cc9481922f9cce42bf373ba7b3ad6e.8f1ce22c878d9cc7422d.js")}catch(e){}